<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>报表</title>
    <script src="/js/echart/echarts.min.js"></script>
</head>
<body>

<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 550px;height:400px; margin: 30px auto"></div>

<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.querySelector("#main"));

    // 指定图表的配置项和数据
    var option = {
        title : {
            text: "客户报表",
            subtext: "${groupType}",
            left:"center"
        },
        tooltip : {
            trigger: "item",
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        toolbox: {
            show : true,
            feature : {
                dataView : {show: true, readOnly: true},
                saveAsImage : {show: true}
            }
        },
        legend: {
            orient: "vertical",
            left: "left",
            data: ${legendDate}
        },
        series : [
            {
                name: "客户数量",
                type: "pie",
                radius : "55%",
                center: ["50%", "60%"],
                data: ${seriesDate},
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: "rgba(0, 0, 0, 0.5)"
                    }
                }
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>